package com.ytg.myapi.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.CompoundButton;

import com.ytg.myapi.BindWay;

/**
 * Created by ximsfei on 2017/1/10.
 */

public class SkinCompatCheckBox extends androidx.appcompat.widget.AppCompatCheckBox {
    public SkinCompatCheckBox(Context context) {
        super(context);
    }

    public SkinCompatCheckBox(Context context, AttributeSet attrs) {
        super(context, attrs);
setOnCheckedChangeListener(new OnCheckedChangeListener() {
    @Override
    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
        if (null != BindWay.getInstance().checkedBack) {
            BindWay.getInstance().checkedBack.onCheckedChanged(buttonView, isChecked);
        }
    }
});
    }

}
